home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / qlib56.zip / VIDEO.DOC < prev   
Text File  |  1992-11-04  |  44KB  |  1,132 lines

  1.     QLIB VIDEO routines give your programs more control over the
  2.     screen than BASIC allows.  You can save and restore screens,
  3.     print on the screen or read from the screen at blinding speed, use
  4.     dual-monitor systems, use "virtual screens", and use screen color
  5.     attributes not availiable with BASIC alone.
  6.  
  7.     Two kinds of QLIB video routines are available: Direct Video Memory
  8.     (DVM), the fastest available, and BIOS, compatible with a wider range of
  9.     hardware and software.
  10.  
  11.     BIOS video routines use the PC's BIOS and are slower than DVM routines,
  12.     but are more compatible with oddball hardware than comparable QLIB DVM
  13.     subroutines.  NOTE: "oddball hardware" does not mean the average $1.98
  14.     PC clone.  QLIB's DVM subroutines were developed using a cheap XT clone
  15.     with a Hercules-clone graphics card, and work equally well with higher-
  16.     priced equipment.  BIOS video subroutines also work in most graphics
  17.     modes, but background colors may not work as expected.  To use BIOS
  18.     subroutines in Hercules graphics mode, QBHERC or MSHERC must be loaded.
  19.     On computers which have multiple screen pages (except Hercules), BIOS
  20.     subroutines work with the page set by QLIB's TPage subroutine or
  21.     BASIC's SCREEN command.
  22.  
  23.     Some multi-task software, as well as weird hardware, has problems with
  24.     DVM.  With this in mind, several BIOS video subroutines were designed to
  25.     share common calling syntax and function with DVM subroutines, so that
  26.     you may quickly adapt your programs to a variety of situations.
  27.  
  28.     Many of QLIB's video routines support a wide variety of screen
  29.     dimensions.  In addition to the standard 40- and 80-column modes,
  30.     EGA 43-row and VGA 50-row text modes are also supported, and users of
  31.     several EGA and VGA systems may also use 132-column text modes at
  32.     QLIB speed.  With the Hercules Graphics Card Plus and InColor card,
  33.     90-column and 43-row modes are available, which work with QLIB's
  34.     video subroutines.  If you are using other equipment which allows non-
  35.     standard text modes, call me and I may be able to help you.
  36.  
  37.     DVM video subroutines take advantage of PC video systems' known video
  38.     memory addresses and transfer data directly to video memory instead of
  39.     working through DOS or the PC BIOS.  This results in nearly instant
  40.     displays.  DVM also provides additional support for the Hercules Graphics
  41.     Card not available otherwise.
  42.  
  43.     Video hardware configurations supported include Monochrome Display Adapter
  44.     (MDA), Color Graphics Adapter (CGA), Hercules Graphics Card, (HGC),
  45.     Hercules Graphics Card Plus (HGC+), Enhanced Graphics Adapter (EGA),
  46.     Everex Micro Enhancer Deluxe EGA (EEGA), Paradise EGA 480 (PEGA),
  47.     MCGA and VGA.  I have used QLIB with MDA, MCGA, HGC, HGC+, EGA, EEGA,
  48.     PEGA, and several VGA systems.
  49.  
  50.  
  51.     Most video display systems have much more memory than required to display
  52.     a full screen of text.  This additional memory is required when the
  53.     system is used in graphics mode, but it may also be used to advantage in
  54.     text mode.  Screen pages may be used to store help screens, to save one
  55.     screen while another is displayed, or to build one screen while another
  56.     is displayed.  The table below summarizes QLIB's screen page support
  57.     for various video systems.  This should not be considered a complete
  58.     table of information.
  59.  
  60.     system         screen size    page numbers   QuickBASIC/BIOS support
  61.     -------------  -----------    ------------   -----------------------
  62.     MDA            80 x 25        0                    yes    (1)
  63.     CGA            80 x 25        0 - 3                yes
  64.     CGA, EGA, VGA  40 x 25        0 - 7                yes
  65.     EGA, VGA       80 x 25        0 - 7                yes
  66.     EGA            80 x 43        0 - 3                yes
  67.     VGA            80 x 50        0 - 3                yes
  68.     Super EGA/VGA 132 x 25        0 - 3              limited
  69.     Super EGA/VGA 132 x 43        0 & 1              limited
  70.     HGC            80 x 25        0 - 15             limited  (2,3)
  71.     HGC+, InColor  90 x 25        0 - 13             limited  (3)
  72.    
  73.     (1)  MDA systems have enough memory for only one complete screen, but
  74.          virtual screens (see MakeVScreen) and ScreenSave may be used to
  75.          duplicate the effect of multiple screen pages.
  76.  
  77.     (2)  Hercules Graphics Cards and clones have sufficient memory for up
  78.          to 16 screen pages.  These are all available if there is no other
  79.          monitor connected to the computer, no RAMFont characters are used
  80.          and the second 32k of Hercules memory is included in the memory map.
  81.          See Use64k.
  82.  
  83.     (3)  BIOS subroutines work on page 0 only.  BASIC gets confused.
  84.  
  85.     Virtual screens may be used with all video systems.  See MakeVScreen.
  86.  
  87.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  88.  
  89.      Function: ANSIColor
  90.      object file: anscolor.obj
  91.  
  92.          ANSIColor returns the color attribute used by the ANSI.SYS
  93.      console driver.
  94.  
  95.      Example:
  96.  
  97.      REM $INCLUDE: 'qlib.bi'
  98.            attr% = ANSIColor
  99.  
  100.  
  101.  
  102.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  103.  
  104.      Subroutine: APrint(st$)
  105.      object file: aprint.obj
  106.  
  107.      Subroutine: APrintN(st$)
  108.      Subroutine: APrintT(st$)
  109.      object file: aprintn.obj
  110.  
  111.          APrint subroutines display the string st$ on the screen using
  112.      ANSI screen colors, begining at the current cursor location.  With
  113.      APrint, the cursor is moved to the end of the string.  APrintN moves
  114.      the cursor to the beginning of the next line, and APrintT adds a TAB,
  115.      moving the cursor past the end of the string.
  116.  
  117.      Example:
  118.  
  119.      CALL APrint(st$)
  120.  
  121.  
  122.  
  123.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  124.  
  125.      Subroutine: BigPrint(st$, row%, col%, attr%)
  126.      object files: bigprint.obj (q$crt.obj)
  127.  
  128.          BigPrint prints st$ on the screen using characters that are
  129.      eight times larger than normal text.  This is handy for attacting
  130.      attention to a display from a distance.  Only characters from
  131.      CHR$(0) through CHR$(127) can be used (but I can add CHR$(128) through
  132.      CHR$(255) if you want).  Only 10 characters will fit across a standard
  133.      80-column screen.
  134.  
  135.      Example:
  136.  
  137.      CALL BigPrint(st$, row%, col%, attr%)
  138.  
  139.  
  140.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  141.  
  142.      Subroutine: BlockFrame(style%, row0%, col0%, row1%, col1%, attr%)
  143.      object file: bframe.obj
  144.  
  145.          BlockFrame is a BIOS version of WindowFrame.  See WindowFrame for
  146.      more documentation.
  147.  
  148.  
  149.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  150.  
  151.      Subroutine: Border(attr%)
  152.      object files: border.obj (getcrt.obj)
  153.  
  154.          Border sets the border color on CGA, EGA and VGA systems.  EGA
  155.      borders are quite thin.  Valid color attributes are 0 - 15.
  156.  
  157.      Example:
  158.          attr% = 1        ' blue
  159.          CALL Border(attr%)
  160.  
  161.  
  162.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  163.  
  164.      Subroutine: Bprint(st$, row%, col%, attr%)
  165.      object file: bprint.obj
  166.  
  167.      Subroutine: BprintL(st$, row%, col%, attr%)
  168.      Subroutine: BprintU(st$, row%, col%, attr%)
  169.      object file: bprintul.obj
  170.  
  171.          These subroutines use BIOS calls to duplicate the functions of
  172.      the Qprint series.  See Qprint for more documentation.
  173.  
  174.  
  175.  
  176.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  177.  
  178.     Subroutine: ClearBlock(row0%, col0%, row1%, col1%, attr%)
  179.     object file: scroll.obj
  180.  
  181.          Uses BIOS calls to duplicate the function of WindowClear,
  182.     below.  See WindowClear for additional information.
  183.  
  184.  
  185.  
  186.  
  187.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  188.  
  189.     Subroutine: ClearEOL(attr%)
  190.     object file: cleareol.obj
  191.  
  192.          Uses BIOS calls to clear a row from the current cursor position
  193.     to then edge of the screen using color attr%.
  194.  
  195.     Example:
  196.          CALL ClearEOL(attr%)
  197.  
  198.  
  199.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  200.  
  201.     Subroutine: ClrScreen(attr%)
  202.     object files: clrscrn.obj (q$crt.obj, q$clrw.obj)
  203.  
  204.          ClrScreen uses DVM to clear the video page set by UseTPage to a
  205.     specified color attribute.  Color attributes may be calculated using
  206.     ColorATTR.
  207.  
  208.     Example:
  209.          CALL ClrScreen(attr%)
  210.  
  211.  
  212.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  213.  
  214.      Subroutine: Clock(row%, col%, attr%)              (QuickBASIC 4.x only)
  215.      Subroutine: NoClock
  216.      object file: qbclock.obj
  217.  
  218.          Clock prints and maintains a clock display on text-mode
  219.      screens at row row% and column col%, printed with color attribute
  220.      attr%.  The clock may be de-activated with NoClock, or may be moved
  221.      by calling clock again.  Clock should be de-activated when using
  222.      graphics modes.
  223.  
  224.      Example:
  225.           CALL Clock(1, 1, 14)     ' activate clock in upper left corner
  226.  
  227.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  228.  
  229.      Function: attr% = ColorAttr(fore%, back%)
  230.      object file: coloratt.obj
  231.  
  232.           Calculates the color attribute (attr%) for many QLIB video
  233.      subroutines.  ColorAttr allows use of the "blink" attribute, which may
  234.      also be used for high-intensity backgrounds (See SetBLINK).
  235.  
  236.  
  237.      Default color values for IBM (and compatible) color displays are:
  238.  
  239.      foreground color   Value
  240.  
  241.          black            0         Note: Background colors 0-7 are
  242.          blue             1         identical to foreground colors 0-7.
  243.          green            2         Background colors 8-15 are identical
  244.          cyan             3         foreground color 8-15 if Blink has
  245.          red              4         been turned off.  If blink is on,
  246.          magenta          5         background colors 8-15 will look like
  247.          brown            6         colors 0-7, and will make the foreground
  248.          "white"          7         blink.
  249.          gray             8
  250.          bright blue      9
  251.          bright green    10
  252.          bright cyan     11
  253.          bright red      12
  254.          bright magenta  13
  255.          yellow          14
  256.          bright white    15
  257.  
  258.     Example:
  259.          REM $INCLUDE: 'qlib.bi'
  260.          REM  I want bright red blinking characters on a green background
  261.          fore% = 12: back% = 10
  262.          attr% = ColorAttr(fore%, back%)
  263.  
  264.  
  265.     (continued on next page)
  266.  
  267.     For IBM Monochrome, Hercules and compatible displays:
  268.  
  269.          foreground value     appearance
  270.  
  271.                 0             black if background% = 0 or 7
  272.                               if background% between 1 and 6,
  273.                               normal if bright% = 0
  274.                               bright if bright% = 1
  275.  
  276.                 1             underlined, or bright + underline if bright% = 1
  277.  
  278.               2 - 7           normal, or bright if bright% = 1
  279.  
  280.          background value     appearance
  281.  
  282.               0 - 6           black
  283.                 7             normal color if foreground% = 0
  284.  
  285.                               bright if blink% = 1, SetBLINK(0)
  286.                                called, and foreground% = 0
  287.  
  288.                               black if foreground% <> 0
  289.  
  290.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  291.  
  292.      Subroutine: CursorColor(attr%)
  293.      object files: curscolr.obj (q$herc.obj)
  294.  
  295.      CursorColor enables the InColor card's color palette and sets the
  296.      cursor color.  If the InColor card in not installed, CursorColor
  297.      does nothing.
  298.  
  299.      Example:
  300.         attr% = 12        ' bright red
  301.                           ' legal color attributes are 1-15
  302.         CALL CursorColor(attr%)
  303.  
  304.  
  305.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  306.  
  307.      Subroutine: CursorON(row%, col%)
  308.      Subroutine: UCursorON(row%, col%)
  309.      Subroutine: CursorOFF
  310.      object file: cursor.obj (q$crt.obj)
  311.  
  312.           CursorON moves the cursor to row%, col%, and makes the cursor
  313.      visible.  An underscore cursor is used if the system is in OVERTYPE
  314.      mode, and the cursor is a larger block if the system is in INSERT mode.
  315.      InsertON and InsertOFF (see EQUIP.DOC) will turn the INSERT mode on
  316.      or off.  UCursorON makes the cursor visible as an underscore regardless
  317.      of the INSERT toggle.  CursorOFF makes the cursor invisible at its current
  318.      location.  Unlike BASIC's LOCATE command, CursorON works with PEGA, EEGA
  319.      and HGC+ extended text modes.  CursorON should not be used to position
  320.      the cursor for a BASIC PRINT command.  To use a text cursor in graphics
  321.      modes, see GCursor in GRAPHICS.DOC.
  322.  
  323.      Example:
  324.        row% = 25: col% = 1
  325.        CALL CursorON(row%, col%)
  326.        REM  this put the cursor in the lower left corner of a standard
  327.        REM  text screen and turned it on.
  328.             .
  329.        CALL CursorOFF
  330.        REM  the cursor is now invisible
  331.  
  332.  
  333.  
  334.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  335.  
  336.     Subroutine: FillEOL(char%, attr%)
  337.     object file: cleareol.obj
  338.  
  339.          Uses BIOS calls to fill a row from the current cursor position
  340.     to then edge of the screen using character char%, and color attr%.
  341.     Note that char% is the ASCII character code of the character used.
  342.  
  343.     Example:
  344.          CALL FillEOL(ASCII("w"), attr%)
  345.  
  346.  
  347.  
  348.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  349.  
  350.     Subroutine: GetANSI(attr%)
  351.     object file: getansi.obj
  352.  
  353.     GetANSI determines the color attribute used by the ANSI device
  354.     driver.  Attr% returned by this subroutine may be used to restore the
  355.     screen to the default colors at the end of a program.
  356.  
  357.     Example:
  358.          CALL GetANSI(attr%)
  359.          CALL ClrScreen(attr%)
  360.          END
  361.  
  362.  
  363.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  364.  
  365.     Function: bordercolor% = GetBorder
  366.     object file: getbord.asm
  367.  
  368.          GetBorder returns the border (overscan) color on CGA, EGA and VGA
  369.     screens.
  370.  
  371.     Example:
  372.          REM $INCLUDE: 'qlib.bi'
  373.          bordercolor% = GetBorder
  374.  
  375.  
  376.  
  377.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  378.  
  379.     Subroutine: GetCHR(char%, attr%)
  380.     object file: getpos.obj
  381.  
  382.          GetCHR returns the ASCII code char% and color attribute attr% on
  383.     the screen at the current cursor position.
  384.  
  385.     Example:
  386.          CALL GetCHR(char%, attr%)
  387.          PRINT "The character at the current cursor position is " + CHR$(char%)
  388.  
  389.  
  390.  
  391.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  392.  
  393.     Subroutine: GetPOS(row%, col%)
  394.     object file: getpos.obj
  395.  
  396.          Uses BIOS calls to determine the current cursor position.  Similar
  397.     to QB's col% = POS(x) and row% = CSRLIN commands, but works with non-
  398.     standard text screens.
  399.  
  400.     Example:
  401.          CALL GetPOS(row%, col%)
  402.  
  403.  
  404.  
  405.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  406.  
  407.     Function: HRam9025
  408.     object files: hram9025.obj (hmode.obj, q$herc.obj)
  409.  
  410.          Sets Hercules Graphics Card Plus and Hercules InColor cards
  411.     in a 90-column RAMFont mode, using the standard ROM characters, and
  412.     returns a confirmation/error code.  Although testing is incomplete,
  413.     most QLIB video subroutines (either DVM or BIOS) should work with this
  414.     mode on page 0.  Use GetCRT or FindMono to determine if the HGC+ or
  415.     InColor card is in your system, or declare HRam9025 as a function
  416.     (example 2) and use the return code to determine success.  Up to 14
  417.     screen pages are possible with this mode, using QLIB's DVM subroutines.
  418.     See ShowTPage.  When using LineEdit in this mode on pages other than
  419.     page 0, do not use the BIOS output option.  When restoring the monochrome
  420.     monitor to standard text mode, you must use HText (see GRAPHICS.DOC) or
  421.     your screen will become quite confused, and monitor damage is a
  422.     possiblity (though mine survived the testing).
  423.  
  424.     Example 1:
  425.          CALL HRam9025
  426.  
  427.     Example 2:
  428.          DECLARE FUNCTION HRam9025 ()
  429.             .
  430.             .
  431.             .
  432.          a% = HRam9025: IF a% = 0 THEN PRINT "90-column mode not available"
  433.          REM a% = 144 or greater if successful
  434.  
  435.  
  436.  
  437.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  438.  
  439.     Function: HRam9043
  440.     object files: hram9043.obj (hmode.obj, q$herc.obj, hload8x8.obj, f8x8.obj)
  441.  
  442.     Function: HRam8043
  443.     object files: hram8043.obj (hmode.obj, q$herc.obj, hload8x8.obj, f8x8.obj)
  444.  
  445.          Similar to HRam9025 above, but sets RamFont cards to 80- or
  446.     90-column, 43-row mode.  HRam8043 and HRam9043 overwrite stored fonts
  447.     with a standard 8x8 character font.
  448.  
  449.  
  450.  
  451.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  452.  
  453.     Subroutine: HScroll(row0%, col0%, row1%, col1%, attr%, columns%)
  454.     object files: hscroll.obj
  455.                  (q$window.obj, q$crt.obj, q$clrw.obj, $wcopy.obj)
  456.  
  457.          A DVM horizontal window scroll routine, scrolling left or right.  The
  458.     area scrolled is limited by row0%, col0%, row1%, col1%.  Positive values
  459.     of columns% will scroll the window left, negative values scroll the window
  460.     right, and columns% = 0 will blank the window.  Columns cleared by the
  461.     scrolling action will be set to color attribute attr%.  See also VScroll.
  462.  
  463.     Example:
  464.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: columns% = 1
  465.          CALL HScroll(row0%, col0%, row1%, col1%, attr%, columns%)
  466.          REM we just scrolled a block of the screen one column left
  467.  
  468.  
  469.  
  470.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  471.  
  472.     Function: pointer% = MakeVScreen(rows%, cols%)
  473.     Subroutine: KillVScreen
  474.     object files: vscreen.obj (q$crt.obj, q$alloc.obj)
  475.  
  476.          MakeVScreen allows QLIB's DVM input and output subroutines to be
  477.     directed to a virtual screen in memory other than video memory.
  478.     MakeVScreen must be called to allocate DOS memory and to establish
  479.     VScreen dimensions before the VScreen can be used.  DVM subroutines
  480.     known to work with virtual screens include:
  481.  
  482.     Qprint         Qread          ClrScreen          WindowFrame
  483.     QprintU        HScroll        ReColorWindow      WindowClear
  484.     QprintL        VScroll        PaintWindow        PaintScreen
  485.     QprintCE       WindowSave     ReColorScreen      QprintW
  486.     SaveScreen     WindowRestore  ScreenSize         TLoad
  487.     TSave
  488.  
  489.     VScreens may be used on MDA-equipped computers to duplicate the effects
  490.     possible with multi-page video systems.  Call UseTPage with page% = -1
  491.     to direct QLIB's DVM subroutines to the virtual screen.  If insufficient
  492.     memory is available for the VScreen, MakeVScreen returns pointer% = 0.
  493.     MakeVScreen also releases any previous VScreen memory before making the
  494.     new VScreen.
  495.     KillVScreen releases the VScreen memory, making it available to the
  496.     BASIC program.  After calling KillVScreen, UseTPage with page% = -1
  497.     will make QLIB use a standard monochrome monitor if one is installed.
  498.  
  499.     Example:
  500.  
  501.     REM The computer has only an MDA display, and we want to build a screen
  502.     REM while another is displayed, then pop the virtual screen into view.
  503.  
  504.     REM $INCLUDE: 'qlib.bi'
  505.     CALL ScreenRows(rows%, cols%)       ' get screen dimensions
  506.     pointer = MakeVScreen(rows%, cols%) ' establish memory screen
  507.     CALL UseTPage(-1, oops)
  508.                         ' QLIB's DVM subroutines will print to the virtual
  509.                         ' screen now.  The screen may be viewed by copying
  510.                         ' to page 0.
  511.     REM  Now we want to pop the virtual screen to the display.
  512.     REM  Since only one VScreen page is possible, you must call UseTPage
  513.     REM  again with page% = 0 otherwise TCopy will not work properly.
  514.     CALL UseTPage(0, oops)
  515.     CALL TCopy(-1, 0, oops)
  516.          .
  517.          .
  518.          .
  519.     REM  All done with this virtual screen, so release the memory so
  520.     REM  that the BASIC program can use it.
  521.     CALL KillVScreen
  522.  
  523.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  524.  
  525.      Function: ModeMono
  526.      Function: ModeColor
  527.      object files: mode.obj (find6845.obj)
  528.  
  529.           ModeMono and ModeColor allow you to switch from monochrome to
  530.      color or color to monochrome monitors if you have a 2-monitor system.
  531.      See EQUIP.DOC to determine what monitors are installed.  After using
  532.      ModeMono or ModeColor, the screen will be cleared.  QLIB's video
  533.      subroutines will work with either monitor.  Be sure to return to the
  534.      original monitor before exiting the program, or QB will get quite
  535.      confused.  ModeColor and ModeMono may be used either as functions
  536.      or as subroutines.  See examples.
  537.  
  538.      Example 1:
  539.          CALL ModeMono   ' if no monochrome monitor is installed, no action
  540.                          ' is taken
  541.  
  542.      Example 2:
  543.          DECLARE FUNCTION ModeMono()
  544.             .
  545.             .
  546.             .
  547.          a% = ModeMono: IF a% THEN CALL Qprint("monochrome monitor",1,1,15)
  548.          REM  a% = 0 if no monochrome monitor installed
  549.          REM  with ModeColor, a% = 0 if no color monitor
  550.          REM  if a% = 3, ModeColor was sucessful
  551.          REM  if a% = 7, ModeMono was sucessful
  552.  
  553.  
  554.  
  555.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  556.  
  557.      Function: Mode43
  558.      object file: mode43.obj
  559.  
  560.           Mode43 sets an EGA system in the standard 80-column, 43-row text
  561.      mode (80 column, 50-row mode for VGA).  Mode43 may be called as a
  562.      subroutine or can be used as a function returning an error flag (see
  563.      examples).  Mode43 may also be used to switch to the EGA or VGA
  564.      monitor in 2-monitor systems.
  565.  
  566.      Example 1:
  567.          CALL GetCRT(crt%)
  568.          IF crt% = 1 OR crt% = 3 THEN CALL Mode43
  569.  
  570.      Example 2:
  571.          DECLARE FUNCTION Mode43% ()
  572.          a% = Mode43: IF a% = 0 THEN PRINT "Mode43 not available"
  573.          REM  a% = 7 if monochrome EGA/VGA, and a% = 3 if color EGA/VGA
  574.  
  575.  
  576.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  577.  
  578.      Function: Mode13243
  579.      Function: Mode13225
  580.      object files: mode132.obj (issevga.obj, egainfo.obj)
  581.  
  582.           Mode13243 and Mode13225 change video modes on supported systems
  583.      to 132-column, 43-row (or 25-row) modes.  Mode13243 and Mode13225
  584.      return 0 if no supported video system is installed.
  585.  
  586.      Supported systems are:
  587.  
  588.      Everex Micro Enhancer EGA
  589.      Paradise EGA 480
  590.      Oak VGA
  591.      Paradise Plus 16 VGA (with Super VGA monitor)
  592.      Tseng VGA (with Super VGA monitor)
  593.      Western Digital VGA (with Super VGA monitor)
  594.  
  595.      Contact me to include your equipment in this list.
  596.  
  597.  
  598.      QLIB subroutines which have been tested in these modes are:
  599.  
  600.          Qprint         ClearBlock     WindowRestore    WindowFrame
  601.          QprintCE       LineEdit       PaintWindow      WindowClear
  602.          QprintU        HScroll        ReColorWindow    Scroll
  603.          QprintL        VScroll        ScreenSave       ScreenRestore
  604.          CursorON       QprintW        WindowSave       ClrScreen
  605.          CursorOFF      Qread          ReColorWindow    PaintScreen
  606.          PaintWindow    ReColorScreen  TCopy            SetBlink
  607.          ScreenSize     BlockFrame     Bprint           BprintU
  608.          BprintL        TLoad          TSave            GetPOS
  609.          SetPOS         MovePOS        GetCHR           ScreenRows
  610.          ShowTPage      UseTPage       TPage            BigPrint
  611.          APrint (1)     APrintN (1)    APrintT (1)      PullDown
  612.          VertList
  613.  
  614.     (1) A replacement for DOS's ANSI.SYS, such as PC Magazine's ANSI.COM
  615.         may provide superior results with these modes.  I can modify
  616.         ANSI.COM to work with your 132-column mode.
  617.  
  618.     BASIC's screen input/output commands, like PRINT and LOCATE, will
  619.     not position the cursor properly in 132 column modes.  Use QLIB's
  620.     subroutines instead.
  621.  
  622.     Use ModeColor or Mode43 to return the system to a standard mode.
  623.     If you do not return to a standard mode before ENDing your program,
  624.     it is likely you will end up with an unreadable screen.
  625.  
  626.     Example:
  627.         REM $INCLUDE: 'qlib.bi'
  628.         IF Mode13243 THEN ...       ' function success
  629.  
  630.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  631.  
  632.     Subroutine: MovePOS(rows%, cols%)
  633.     object file: movepos.obj
  634.  
  635.          Moves the cursor from its present position by rows% rows and cols%
  636.     columns.  Rows% and cols% may be positive or negative.
  637.  
  638.     Example:
  639.          rows% = -2              ' move the cursor up two rows
  640.          cols% = 0
  641.          CALL MovePOS(rows%, cols%)
  642.  
  643.  
  644.  
  645.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  646.  
  647.     Subroutine: PaintScreen(attr%)
  648.     object files: paint.obj (q$crt.obj, q$paint.obj)
  649.  
  650.          PaintScreen changes the color attribute over the entire screen to
  651.     attr%.  Affects only the video page set by UseTPage.
  652.  
  653.     Example:
  654.          CALL PaintScreen(attr%)
  655.  
  656.  
  657.  
  658.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  659.  
  660.     Subroutine: PaintWindow(row0%, col0%, row1%, col1%, attr%)
  661.     object files: pwindow.obj (q$window.obj, q$crt.obj, q$paint.obj)
  662.  
  663.          DVM routine which changes the color attribute on a block of the
  664.     active video page defined by row0%, col0%, row1%, col1%.  The entire block
  665.     is changed to attr%.  Changes color on video page set by UseTPage.
  666.  
  667.     Example:
  668.          row0% = 1: col0% = 1: row1% = 25: col1% = 80
  669.          CALL PaintWindow(row0%, col0%, row1%, col1%, attr%)
  670.          REM  we just changed the entire screen to color attr% without
  671.          REM  re-printing the text.
  672.  
  673.  
  674.  
  675.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  676.  
  677. THE QPRINT SERIES
  678.  
  679.     QuickPRINT DVM routines print a string of text on the screen at very
  680.     high speed.  QPRINT routines include built-in LOCATE and COLOR statements,
  681.     and do not affect the cursor position.  ALL ASCII characters may be used,
  682.     but QPRINT routines work only in text mode.  Color attributes (attr%) may
  683.     be calculated with ColorATTR.  UseTPage sets QPRINT's active page (Page 0
  684.     only for MDA).
  685.  
  686.     Subroutine: QCenter(st$, row%, attr%)
  687.     object files: qcenter.obj (q$crt.obj, q$qprn.obj)
  688.  
  689.     Subroutine: QPrint(st$, row%, col%, attr%)
  690.     object files: qprint.obj (q$crt.obj, q$qprn.obj)
  691.  
  692.     Subroutine: QPrintU(st$, row%, col%, attr%)
  693.     Subroutine: QPrintL(st$, row%, col%, attr%)
  694.     object files: qprintul.obj (q$crt.obj)
  695.  
  696.     Subroutine: QPrintCE(st$, row%, col%, attr%)
  697.     object files: qprintce.obj (q$crt.obj, q$qprn.obj, q$clrw.obj)
  698.  
  699.          QPrint, the fastest and most compact of the QPRINT series, will
  700.     meet most needs.  QPrintU will print a-z as upper case A-Z, and QPrintL
  701.     will print A-Z as lower case a-z without changing st$.  QPrintCE clears
  702.     the screen from the end of st$ to the right edge of the screen.  QCenter
  703.     qprints the string centered horizontally on the row specified.
  704.  
  705.     Example:
  706.          st$ = "This is a test of fast screen printing"
  707.          row% = 10: col% = 20
  708.          CALL QPrint(st$, row%, col%, attr%)
  709.  
  710.  
  711.  
  712.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  713.  
  714.     Subroutine: QprintVArray(addr%, row0%, col%, attr%, n%)
  715.     object files: qprintva.obj (q$crt.obj, q$qprn.obj)
  716.  
  717.     Subroutine: QprintFArray(segment%, addr%, len(a), row0%, col0%, attr%, n%)
  718.     object files: qprintfa.obj (q$crt.obj, q$qprn.obj)
  719.  
  720.          QprintArray subroutines print n% elements of the string array a$()
  721.     beginning at row0%.  The first array element is printed at row0%, col%,
  722.     the second at row0% + 1, col%, and so on.  QprintVArray is for arrays of
  723.     normal variable-length strings, and QprintFArray is for arrays of QB4's
  724.     fixed-length strings.
  725.  
  726.     Example 1:
  727.          DIM a$(10)          ' 11 array elements, a$(0) through a$(10)
  728.          a$(0) = "This is the first string"
  729.          a$(1) = "This is the second string"
  730.          n% = 5                   ' print a$(0) through a$(4)
  731.          row0% = 5: col% = 10
  732.          addr% = VARPTR(a$(0))    ' a$(0) is the first one to be printed
  733.          CALL QprintVArray(addr%, row0%, col%, attr%, n%)
  734.  
  735.     Example 2:          (QB4+ only)
  736.          DIM a(10) AS STRING*20   ' 11 array elements, each string 20 bytes
  737.          a(0) = "This is the first string"
  738.          a(1) = "This is the second string"
  739.          n% = 5: row0% = 5: col% = 10: l% = LEN(a(0))
  740.          segment% = VARSEG(a(0))
  741.          addr% = VARPTR(a(0))
  742.          CALL QprintFArray(segment%, addr%, l%, row0%, col%, attr%, n%)
  743.  
  744.  
  745.  
  746.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  747.  
  748.     Subroutine: QPrintW(st$, row0%, col0%, row1%, col1%, attr%)
  749.     object files: qprintw.obj
  750.                   (q$window.obj, q$crt.obj, q$qprn.obj, q$clrw.obj)
  751.  
  752.          QPrintW adds word wrap to QPrint.  Text is confined to a window of
  753.     the screen defined by row0%, col0%, row1%, col1%, and each line of text
  754.     is broken between words unless the word is longer than the width of the
  755.     window, when the word will be broken at the edge of the window. QPrintW
  756.     also clears all parts of the window not occupied by the string. If st$
  757.     is a nul string, QPrintW will clear the window and return to QuickBASIC.
  758.  
  759.     Example:
  760.          st$ = "This is a test of fast screen printing with word wrap"
  761.          row0% = 10: col0% = 20: row1% = 15: col1% = 50
  762.          CALL QPrintW(st$, row0%, col0%, row1%, col1%, attr%)
  763.  
  764.  
  765.  
  766.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  767.  
  768.     Subroutine: QRead(st$, row%, col%)
  769.     object files: qread.obj (q$crt.obj)
  770.  
  771.          Uses DVM to read a string of text from the active video page.
  772.     The initial length of st$ determines the length of the string returned
  773.     by QRead.  This is like QPrint in reverse.
  774.  
  775.     Example:
  776.          st$ = SPACE$(14)
  777.          row% = 12: col% = 5
  778.          CALL QRead(st$, row%, col%)
  779.          REM  st$ is now the first 14 characters on the active video page
  780.          REM  beginning at row 12, column 5
  781.  
  782.  
  783.  
  784.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  785.  
  786.     Subroutine: ReColorScreen(oldattr%, newattr%)
  787.     object files: recolor.obj (q$crt.obj)
  788.  
  789.          Replaces oldattr% with newattr%, allowing the programmer to
  790.     selectively change screen colors.  Affects only the video page set by
  791.     UseTPage.
  792.  
  793.     Example:
  794.          ReColorScreen(oldattr%, newattr%)
  795.  
  796.  
  797.  
  798.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  799.  
  800.     Subroutine: ReColorWindow(row0%, col0%, row1%, col1%, oldattr%, newattr%)
  801.     object files: rcwindow.obj (q$window.obj, q$crt.obj, recolor.obj)
  802.  
  803.          Replaces oldattr% color with newattr% in the window defined by
  804.     row0%, col0%, row1%, col1%, without re-printing the contents of the
  805.     window.
  806.  
  807.     Example:
  808.          oldattr% = 7             ' gray on black to be replaced
  809.          newattr% = 14            ' with bright red on black
  810.          row0% = 10: col0% = 1    ' from row 10, column 1
  811.          row1% = 25: col1% = 80   ' to the end of the screen
  812.          CALL ReColorWindow(row0%, col0%, row1%, col1%, oldattr%, newattr%)
  813.  
  814.  
  815.  
  816.     ScreenRows(rows%, columns%)
  817.     object files: scrnrows.obj (q$crt.obj)
  818.  
  819.         ScreenRows allows you to determine the screen's dimensions.  Rows
  820.     are the vertical dimension and columns are the horizontal dimension.
  821.  
  822.     Example:
  823.         CALL ScreenRows(rows%, columns%)
  824.         REM a standard 80 x 25 screen returns rows% = 25 and columns% = 80
  825.  
  826.  
  827.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  828.  
  829.     Subroutine: ScreenRestore(screenaddr%)
  830.     Subroutine: ScreenSave(screenaddr%)
  831.     object files: screen.obj (q$crt.obj, $wcopy.obj)
  832.  
  833.     Function: ScreenMem
  834.     object files: smem.obj (q$crt.obj, q$alloc.obj)
  835.  
  836.     Uses DVM to save/restore display screen video page set by UseTPage in a
  837.     memory buffer.  ScreenMem calculates the amount of memory required to
  838.     store the screen, allocates the memory, and returns the segment address
  839.     of the memory block.  Use FreeMem(screenaddr%) to release the memory.
  840.  
  841.     Example:
  842.          REM $INCLUDE: 'qlib.bi'
  843.          screenaddr% = ScreenMem
  844.          CALL ScreenSave(screenaddr%)      ' save this screen
  845.             .
  846.             .
  847.             .
  848.          CALL ScreenRestore(screenaddr%)   ' bring the screen back
  849.          CALL FreeMem(screenaddr%)         ' release the memory block
  850.  
  851.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  852.  
  853.     Subroutine: Scroll(row0%, col0%, row1%, col1%, attr%, lines%)
  854.     object file: scroll.obj
  855.  
  856.          Uses BIOS calls to scroll a window of the screen lines% rows,
  857.     limited by row0%, col0%, row1%, col1%.  Positive values of lines% will
  858.     scroll the screen up, negative values scroll the screen down, and lines%
  859.     = 0 will blank the window.  Rows cleared by the scrolling action will be
  860.     set to color attribute attr%.
  861.  
  862.     Example:
  863.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: lines% = 1
  864.          CALL Scroll(row0%, col0%, row1%, col1%, attr%, lines%)
  865.          REM we just scrolled everything in the window up one row
  866.  
  867.  
  868.  
  869.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  870.  
  871.     Subroutine: SetBLINK(a%)
  872.     object file: setblink.obj
  873.  
  874.          Enables / disables blinking attributes in text mode.  When blinking
  875.     is disabled, blinking reverse video attributes are changed from normal
  876.     intensity backgrounds to high intensity.  SetBLINK affects all screen
  877.     pages.
  878.  
  879.     Example:
  880.          a% = 0
  881.          CALL SetBLINK(a%)  ' turn blink off, high intensity backgrounds on
  882.          a% = 1
  883.          CALL SetBLINK(a%)  ' restore blinking attributes
  884.  
  885.  
  886.  
  887.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  888.  
  889.     Subroutine: SetPOS(row%, col%)
  890.     object file: movepos.obj
  891.  
  892.          Positions the cursor at row%, col%.  Similar to QB's LOCATE row, col
  893.     command, but works with non-standard text screens.  Don't use SetPOS to
  894.     position the cursor for a PRINT command.
  895.  
  896.     Example:
  897.          CALL Mode13243       ' use 132-column mode
  898.          row% = 40
  899.          col% = 100
  900.          CALL SetPOS(row%, col%)
  901.  
  902.  
  903.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  904.  
  905.      Subroutine: ShowTPage(page%, oops%)
  906.      object files: tpage.obj (q$crt.obj, q$herc.obj)
  907.  
  908.          ShowTPage allows you to see screen page number page%.  Does
  909.      NOT affect QuickBASIC's PRINT command.  NOTE: ShowTPage will not
  910.      work with MDA or standard Hercules equipment.  On HGC+, ShowTPage
  911.      works with either HText (pages 0 - 3) or HRam9025 (pages 0 - 2) modes.
  912.      Use QLIB's DVM subroutines to print on all Hercules (standard or HGC+)
  913.      pages, and use CursorON to position the cursor.  See also UseTPage and
  914.      TPage.  Oops% = -1 if page% is too big, and oops% = 1 if QLIB can
  915.      use the page but can't display it (as with a standard Hercules page).
  916.      If ShowTPage can't show a page, you can use TCopy to copy the page to
  917.      one that can be shown.
  918.  
  919.      Example:
  920.          CALL ShowTPage(page%, oops%)
  921.  
  922.  
  923.  
  924.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  925.  
  926.     Subroutine: SnowON
  927.     Subroutine: SnowOFF
  928.     object file: crt.asm
  929.  
  930.          Alters "snow" control used by QLIB's DVM subroutines.  QLIB's
  931.     default is SnowON with CGA and MCGA, SnowOFF with other video systems.
  932.     SnowON prevents annoying interference on the screen with older CGA video
  933.     systems.  This "snow" control slows QLIB when used with CGA.  Many newer
  934.     CGA cards do not have the "snow" problem.  SnowOFF disables QLIB's snow
  935.     control logic for maximum speed.  Use SnowOFF if the computer is a
  936.     PS/2 model 25 or model 30 with MCGA.
  937.  
  938.  
  939.     Example:
  940.         REM $INCLUDE: 'qlib.bi'
  941.         PRINT "Do you want to disable the snow control?"
  942.         IF YesNo = ASCII("Y") THEN CALL SnowOFF
  943.  
  944.  
  945.  
  946.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  947.  
  948.     Subroutine: TCopy(frompage%, topage%, oops%)
  949.     object files: tcopy.obj (tpage.obj, q$crt.obj, q$herc.obj, $wcopy.obj)
  950.  
  951.          Similar to BASIC's PCOPY command, TCopy copies one page of video
  952.     memory to another using DVM.  This may be used to save screens to recall
  953.     later.  Oops% will be set to -1 if frompage% is too big, or -2 if
  954.     topage% is too big.  Oops% = 0 if no error.  For MDA systems use
  955.     ScreenSave.
  956.  
  957.     All screen pages saved by TCopy are erased when the system is
  958.     changed to or from Graphics mode.  (Except when using QLIB's HGraph0
  959.     on Hercules systems.  See GRAPHICS.DOC.)  Use ScreenSave to save text
  960.     screens before the system is used in Graphics mode.  TCopy works in all
  961.     multi-page text modes supported by QLIB.
  962.  
  963.     Example:
  964.          CALL TCopy(frompage%, topage%, oops%)
  965.  
  966.  
  967.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  968.  
  969.     Subroutine: TLoad(filename$, oops%)
  970.     object files: tsave.obj (q$crt.obj, $asciiz.obj)
  971.  
  972.         TLoad copies a screen file from a disk to video memory.  Oops%
  973.     returned by TLoad = 0 if no error occurred.  See also TSave.
  974.  
  975.     Example:
  976.         filename$ = "helpfile.hlp"
  977.         CALL TLoad(filename$, oops%)
  978.  
  979.  
  980.  
  981.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  982.  
  983.     Subroutine: TPage(page%, oops%)
  984.     object files: tpage.obj (q$crt.obj, q$herc.obj)
  985.  
  986.          TPage combines the functions of UseTPage and ShowTPage.
  987.  
  988.     Example:
  989.          CALL TPage(page%, oops%)
  990.          REM this is equivalent to
  991.          REM  CALL UseTPage(page%, oops%)
  992.          REM  CALL ShowTPage(page%, oops%)
  993.  
  994.  
  995.  
  996.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  997.  
  998.     Subroutine: TSave(filename$, oops%)
  999.     object files: tsave.obj (q$crt.obj, $asciiz.obj)
  1000.  
  1001.          TSave copies a text-mode screen to a file.  Oops%
  1002.     returned by TSave = 0 if no error occurred.  See also TLoad.
  1003.  
  1004.     Example:
  1005.         filename$ = "helpfile.hlp"
  1006.         CALL TSave(filename$, oops%)
  1007.  
  1008.  
  1009.  
  1010.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1011.  
  1012.     Subroutine: VScroll(row0%, col0%, row1%, col1%, attr%, lines%)
  1013.     object files: vscroll.obj
  1014.                   (q$window.obj, q$crt.obj, $wcopy.obj, q$clrw.obj)
  1015.  
  1016.          A DVM vertical window scroll routine.  The area scrolled is limited
  1017.     by row0%, col0%, row1%, col1%.  Positive values of lines% will scroll the
  1018.     screen up, negative values scroll the screen down, and lines% = 0 will
  1019.     blank the block of the screen.  Rows cleared by the scrolling action will
  1020.     be set to color attribute attr%.  See also HScroll.
  1021.  
  1022.     Example:
  1023.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: lines% = 1
  1024.          CALL VScroll(row0%, col0%, row1%, col1%, attr%, lines%)
  1025.          REM we just scrolled a block of the screen one row up
  1026.  
  1027.  
  1028.  
  1029.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1030.  
  1031.     Subroutine: UseTPage(page%, oops%)
  1032.     object files: tpage.obj (q$crt.obj, q$herc.obj)
  1033.  
  1034.          Sets active video page used by most DVM video routines.  See also
  1035.     TPage and ShowTPage.  Oops% = -1 if page% is too big.  Does NOT affect
  1036.     BIOS subroutines.  If page% = -1, QLIB's DVM subroutines will use
  1037.     either a standard 80-column, 25-row monochrome monitor if installed,
  1038.     or a 'virtual' screen established by MakeVScreen.
  1039.  
  1040.     Example:
  1041.          page% = 2
  1042.          CALL UseTPage(page%, oops%)
  1043.          REM  Qread, SaveScreen, PaintWindow, ClrScreen,
  1044.          REM  ClrBlock, VScroll, ReColorWindow, WindowSave, WindowResore,
  1045.          REM  HScroll and the Qprint series will now use screen page 2.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1051.  
  1052.      Subroutine: WindowClear(row0%, col0%, row1%, col1%, attr%)
  1053.      object files: wclear.obj (q$window.obj, q$crt.obj, q$clrw.obj)
  1054.  
  1055.          Uses DVM to clear a window of the screen from row0%, col0%, to
  1056.      row1%, col1%, where row1% > row0%, col1% > col0%.  The window may be
  1057.      cleared to any color attribute. Color attributes may be calculated
  1058.      using ColorATTR.
  1059.    
  1060.      Example:
  1061.          CALL WindowClear(row0%, col0%, row1%, col1%, attr%)
  1062.  
  1063.  
  1064.  
  1065.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1066.  
  1067.      Subroutine: WindowFill(row0%, col0%, row1%, col1%, attr%, char%)
  1068.      object files: wfill.obj
  1069.                    (wclear.obj, q$window.obj, q$crt.obj, q$clrw.obj)
  1070.  
  1071.           Fills an area of the screen with specified character and color
  1072.      attribute; this is an alternate entry for the WindowClear subroutine.
  1073.  
  1074.      Example:
  1075.          char%  = ASC("■")
  1076.          CALL WindowFill(row0%, col0%, row1%, col1%, attr%, char%)
  1077.  
  1078.      
  1079.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1080.  
  1081.      Subroutine: WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1082.      object files: wframe.obj
  1083.                    (q$window.obj, q$crt.obj, q$qprn.obj, q$clrw.obj)
  1084.  
  1085.           WindowFrame draws a box with corners at (row0%, col0%),
  1086.      (row0%, col1%), (row1%, col0%), (row1%, col1%).  Double lines are used to
  1087.      draw the box if style% = -1, single lines if style% = 0.  An ASCII
  1088.      character may be used instead of single or double lines, if style% is
  1089.      an integer from 1 to 255.  The border will be made of CHR$(style%).
  1090.  
  1091.      Example:
  1092.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: style% = -1
  1093.          CALL WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1094.          REM we just drew a box on the screen in color attr%, using
  1095.          REM double lines
  1096.            .
  1097.            .
  1098.            .
  1099.          style$ = "Yellow"
  1100.          style% = ASC(style$)
  1101.          CALL WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1102.          REM we just replaced the double-lined box with a box bordered
  1103.          REM with "Y"
  1104.  
  1105.  
  1106.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1107.  
  1108.     Subroutine: WindowSave(windowaddr%, row0%, col0%, row1%, col1%)
  1109.     Subroutine: WindowRestore(windowaddr%, row0%, col0%, row1%, col1%)
  1110.     object files: wsave.obj (q$window.obj, q$crt.obj, $wcopy.obj)
  1111.  
  1112.     Function: wsegment% = WindowMem(row0%, col0%, row1%, col1%)
  1113.     object files: wsave.obj (q$alloc.obj, q$window.obj, q$crt.obj)
  1114.  
  1115.     Must compile BASIC source code with /O option
  1116.  
  1117.     WindowSave is used to copy a block of the screen to an array in order
  1118.     to restore the window at a later time with WindowRestore.  WindowMem
  1119.     calculates the size of the memory block needed to store the window and
  1120.     allocates the memory, returning the segment address of the memory block.
  1121.  
  1122.     Example:
  1123.     REM $INCLUDE: 'qlib.bi'
  1124.     row0% = 10: col0% = 10: row1% = 20: col1% = 60
  1125.     wsegment% = WindowMem(row0%, col0%, row1%, col1%)
  1126.     IF wsegment% = 0 THEN ...   ' do error handling stuff - could be too big
  1127.     CALL WindowSave(wsegment%, row0%, col0%, row1%, col1%)
  1128.          .
  1129.          .
  1130.     CALL WindowRestore(wsegment%, row0%, col0%, row1%, col1%)
  1131.     CALL FreeMem(wsegment%)     ' release the memory block
  1132.